package smartcampus.scjava.POJO.DO;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import smartcampus.scjava.POJO.DTO.BaseReqDto;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * <p>
 * 书籍借阅表
 * </p>
 *
 * @author xian
 * @since 2023-11-22
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("book_borrow")
public class BookBorrow implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 用户ID
     */
    @NotNull
    private Integer userId;

    /**
     * 书籍编号
     */
    @NotEmpty
    private String bookNo;

    /**
     * 书籍编号
     */
    private String bookName;

    /**
     * 开始时间
     */
    @NotNull
    private LocalDate beginDate;

    /**
     * 到期时间
     */
    @NotNull
    private LocalDate endDate;

    /**
     * 借用天数
     */
    private Integer borrowDay;

    /**
     * 状态 0-未归还 1-已归还
     */
    private Integer status;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    private LocalDateTime updateTime;

    /**
     * 逻辑删除字段:0.存在;1.删除
     */
    private Integer isDelete;


}
